number = int(input())
count = 0
number_list = [0,0,0,0]
if number >= 0 and number <= 1000 :
    if number % 2 == 0:
        count += 1
    if number > 4 and number <= 12:
        count += 1
    if count == 2:
        number_list[0] = 1
    if count == 1 or count == 2:
        number_list[1] = 1
    if count == 1:
        number_list[2] = 1
    if count == 0:
        number_list[3] = 1
    print(" ".join(map(str,number_list)))
else:
    print("数据不在范围内")
    